package thread;
/*
用匿名内部类 改写成lamda方法
 */
public class ThreadDemo3 {
    public static void main(String[] args) {
        Runnable r1 = new Runnable(){
          public  void run(){
              for (int i=0;i<100;i++){
                  System.out.println("老婆是大傻嘚");
              }
          }
        };
        Thread t1 = new Thread(r1);
        Thread t2 = new Thread(()->{
            for (int i = 0; i < 100; i++) {
                System.out.println("老婆是大山炮");
            }
        });
        t1.start();
        t2.start();
    }
}
